-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Laravel Pint as a linter #100 #364
Conversation
3fbf652
to
c74d731
Compare
@dmohns can you please check this |
Sure, I will follow up with this next week 👌 |
c74d731
to
fb99951
Compare
Hey @munyanezaarmel apologies for my delayed response here. I will take a look now 🕵️ |
fb99951
to
7a5e914
Compare
Hey @munyanezaarmel so, after reviewing this here are my thoughts. It looks like Laravel Pint is actually just a rule-set to PHP-CS-Fixer plus a small wrapper around it for nicer CLI integration. The exact rule configuration can be seen here: https://github.com/laravel/pint/blob/main/resources/presets/laravel.php Now, I don't think there is a benefit of adding the tool it self then. I was originally hoping there is some additional rules and checks in there, which PHP-CS-Fixer cannot cover. But this doesn't seem to be the case. None-the-less... I think some of the conventions that the Laravel rule set I actually like a lot. So there is something to take away from here. Could you instead please adapt our current PHP-CS-Fixer rule set with the following rules: 'method_chaining_indentation' => true,
'braces_position' => [
'control_structures_opening_brace' => 'same_line',
'functions_opening_brace' => 'same_line',
'anonymous_functions_opening_brace' => 'same_line',
'classes_opening_brace' => 'same_line',
'anonymous_classes_opening_brace' => 'same_line',
'allow_single_line_empty_anonymous_classes' => true,
'allow_single_line_anonymous_functions' => true,
],
'method_argument_space' => [
'on_multiline' => 'ensure_fully_multiline',
],
'single_line_empty_body' => true, ? |
Hey @munyanezaarmel for changing the rules set of PHP-CS-Fixer, could you do the following:
Then we will merge this PR.
|
Superseded by: #382 |
Brief summary of the change made
closes:#100
Are there any other side effects of this change that we should be aware of?
Describe how you tested your changes?
Pull Request checklist
Please confirm you have completed any of the necessary steps below.